package com.mapper;

import com.entity.ShopNews;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShopNewsMapper {

    @Select("select count(id) from shop_news")
    int getCountNews();

    @Select("select * from shop_news")
    List<ShopNews> selectAllNews();

    List<ShopNews> selectAllNewsByPage(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);

    int deleteByPrimaryKey(Integer id);

    int deleteMoreNews(Integer[] ids);

    int insert(ShopNews record);

    int insertSelective(ShopNews record);

    ShopNews selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShopNews record);

    int updateByPrimaryKey(ShopNews record);
}